Skip to main content
POST
/
v1
/
customers
/
segments
Create segment
curl --request POST \
  --url https://api.hyperline.co/v1/customers/segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "rules": [
    {
      "operator": "and",
      "conditions": [
        {
          "field": "country",
          "operator": "in",
          "value": [
            "FR"
          ]
        }
      ]
    }
  ],
  "description": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "rules": [
    {
      "id": "<string>",
      "operator": "and",
      "conditions": [
        {
          "field": "country",
          "operator": "in",
          "value": [
            "FR"
          ]
        }
      ]
    }
  ],
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
rules
object[]
required
Minimum array length: 1
description
string

Response

201 - application/json
id
string
required
name
string
required
description
string | null
required
rules
object[]
required
created_at
string<date>
required
updated_at
string<date>
required